package com.yhn.bubblevideo.user.controller;

import com.yhn.bubblevideo.user.config.SpringProducer;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yhn
 * @version 1.0
 * @description
 * @date 2024/12/17 15:46
 */
@RestController
@RequestMapping("/mq")
public class MqController {
    @Resource
    private SpringProducer springProducer;

    @PostMapping("/sendMessage")
    public String sendMessage(String message) {
        springProducer.sendMsg(message);
        return "消息发送完成";
    }
}
